package il.ac.bgu.cs.heuristics.graph.types;

import il.ac.bgu.cs.heuristics.graph.pddl.parser.types.ITypedConstant;
import il.ac.bgu.cs.heuristics.graph.pddl.parser.types.Predicate;

import java.util.List;

/**
 * @author Ronen Pinko
 */
public interface ISubstitution {

	/**
	 * Returns {@code true} if the underlying predicate's operator is anything
	 * but NOT
	 */
	boolean result();

	/**
	 * Returns {@code true} if this substitution contradicts the other
	 */
	boolean isContradicting(ISubstitution other);

	/**
	 * Returns the underlying predicate this substitution reflects
	 */
	Predicate getPredicate();

	/**
	 * Returns the constants that were substituted instead of the predicate
	 * parameters
	 */
	List<ITypedConstant> getSubstitutedConstants();

	/**
	 * @param other
	 * @return True iff the substitution is the same except that the logical
	 *         operator is inverted
	 */
	boolean isNegateSubstitution(ISubstitution other);

	ISubstitution clone() throws CloneNotSupportedException; // NOPMD

}
